<template>
  <el-table
    v-loading="loading"
    :data="tableData"
    stripe
    @selection-change="(selection) => $emit('selection-change', selection)"
  >
    <el-table-column type="selection" align="center" />
    <el-table-column prop="roleName" label="角色名称" align="center" />
    <el-table-column prop="roleValue" label="角色值" align="center" />
    <el-table-column prop="description" label="角色描述" align="center" />
    <el-table-column prop="createTime" label="创建时间" align="center" />
  </el-table>
</template>

<script>
export default {
  props: {
    tableData: {
      type: Array,
      required: true,
      default: () => []
    },
    loading: {
      type: Boolean,
      required: true,
      default: () => false
    }
  }
}
</script>

<style lang="stylus" scoped>
.el-table
  margin-top 20px
</style>
